import request from "@/utils/request";

export function getApplicationList(query) {
  return request({
    url: "/system/applicationManage/list",
    method: "get",
    params: query,
  });
}

export function add(data) {
  return request({
    url: "/system/applicationManage/add",
    method: "post",
    data,
  });
}

export function edit(data) {
  return request({
    url: "/system/applicationManage/edit",
    method: "post",
    data,
  });
}

export function remove(data) {
  return request({
    url: "/system/applicationManage/delete",
    method: "post",
    data,
  });
}

export function getInfo(query) {
  return request({
    url: "/system/applicationManage/getInfo",
    method: "get",
    params: query,
  });
}

export function updateSwitch(params) {
  return request({
    url: "/system/applicationManage/updateSwitch",
    method: "post",
    params,
  });
}

export function getBusinessSystemName(query) {
  return request({
    url: "/system/applicationManage/getBusinessSystemName",
    method: "get",
    params: query,
  });
}

export function getApi(query) {
  return request({
    url: "/system/applicationManage/getApi",
    method: "get",
    params: query,
  });
}

export function getApiTotal(query) {
  return request({
    url: "/system/applicationManage/getApiTotal",
    method: "get",
    params: query,
  });
}

export function updateLineStatus(data) {
  return request({
    url: "/system/applicationManage/updateLineStatus",
    headers: {
      "Content-Type": "multipart/form-data",
    },
    method: "post",
    data,
  });
}

export function queryApplicationUrlList(params) {
  return request({
    url: "/system/applicationManage/queryApplicationUrlList",
    method: "get",
    params,
  });
}

export function applicationList(query) {
  return request({
    url: "/system/applicationManage/applicationList",
    method: "get",
    params: query,
  });
}
